// server.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "comProtocol.h"
#include "server/comServer.h" 
#include "server/gameLoopServer.h"
#include "stdlib.h"
#include <iostream>

using namespace std;

int main(int argc, char* argv[])
{
	if(argc != 4) {
		cout << "Usage: server.exe [ip] [port] [logfile]";
		return 1;
	}

	ComServer* cs = new ComServer();
	cs->Listen(argv[1], atoi(argv[2]));

	GameLoopServer* gameLoop = new GameLoopServer(cs, argv[3]);
	gameLoop->Run();

	//system("pause");
	return 0;
}

